package org.jtao.gbsubject.service.dto;


import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;
import java.util.Objects;

/**
 * A DTO for the CurrentState entity.
 */
public class CurrentStateDTO implements Serializable {

    private Long id;

    private Float value;

    private Float referenceValue;

    private Float deviation;

    private Long subjectId;

    private String subjectName;

    private Long indicatorId;

    private String indicatorName;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Float getValue() {
        return value;
    }

    public void setValue(Float value) {
        this.value = value;
    }

    public Float getReferenceValue() {
        return referenceValue;
    }

    public void setReferenceValue(Float referenceValue) {
        this.referenceValue = referenceValue;
    }

    public Float getDeviation() {
        return deviation;
    }

    public void setDeviation(Float deviation) {
        this.deviation = deviation;
    }

    public Long getSubjectId() {
        return subjectId;
    }

    public void setSubjectId(Long subjectId) {
        this.subjectId = subjectId;
    }

    public String getSubjectName() {
        return subjectName;
    }

    public void setSubjectName(String subjectName) {
        this.subjectName = subjectName;
    }

    public Long getIndicatorId() {
        return indicatorId;
    }

    public void setIndicatorId(Long indicatorId) {
        this.indicatorId = indicatorId;
    }

    public String getIndicatorName() {
        return indicatorName;
    }

    public void setIndicatorName(String indicatorName) {
        this.indicatorName = indicatorName;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        CurrentStateDTO currentStateDTO = (CurrentStateDTO) o;
        if(currentStateDTO.getId() == null || getId() == null) {
            return false;
        }
        return Objects.equals(getId(), currentStateDTO.getId());
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(getId());
    }

    @Override
    public String toString() {
        return "CurrentStateDTO{" +
            "id=" + getId() +
            ", value=" + getValue() +
            ", referenceValue=" + getReferenceValue() +
            ", deviation=" + getDeviation() +
            "}";
    }
}
